Connect
AutomatR.MSSQLDataBase.Database.Connect
The "Connect" activity in AutomatR for SQL Server databases establishes a connection to a database using a standard connection string. This activity is fundamental for executing SQL queries and operations on the specified database.
Properties
Name | Description |
---|---|
Input | |
Authentication Type | Select the type of authentication: Windows or SQL Server. |
Data Base Name | Enter the name of the database to which you want to connect. |
Password | Enter the password to authenticate the connection. (Optional, required for SQL Server Authentication) |
Source | Enter the database system to retrieve data or establish a connection. |
User Name | Enter the username to authenticate the connection. (Optional, required for SQL Server Authentication) |
Misc | |
DisplayName | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Connect" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Connection | Returns the database connection variable once the database connection is successful. |
How to use:
- Drag and drop the "Connect" activity onto the workflow.
- Configure the properties by specifying the source, database name, and authentication details.
- Optionally, configure the delay for synchronization purposes.
- Execute the workflow to establish a connection to the specified database.
Example: Consider an example where the "Connect" activity is used to establish a connection to a SQL Server database named "DemoDB" using Windows Authentication:
Connect:
Source: "WIN-50GP30FGO75"
Data Base Name: "DemoDB"
Authentication Type: Windows Authentication
Connection: SqlConnectionVariable
In this example, the "Connect" activity connects to the SQL Server database "DemoDB" on the system "WIN-50GP30FGO75" using Windows Authentication. The successful connection is stored in the SqlConnection variable "SqlConnectionVariable" for further use in the workflow.